package com.five.wisdomClass.controller;

import com.five.wisdomClass.bean.ResponseData;
import com.five.wisdomClass.entity.Student;
import com.five.wisdomClass.entity.Teacher;
import com.five.wisdomClass.service.IStudentService;
import com.five.wisdomClass.service.ITeacherService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Tag(name="教师的基本操作")
@Slf4j
@RestController
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/teacher")
public class TeacherController extends BaseController{

    private final ITeacherService teacherService;

    @Operation(summary = "获取课程表")
    @PostMapping("/getcourses")
    public ResponseData<Object> getCourses(@RequestBody Teacher teacher){
        return returnObject(teacherService.getCourses(teacher));
    }

}
